package com.infore.qualityControl.repository;

import java.util.Date;
import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import com.infore.qualityControl.po.AutomaticAndManualComparison;

@Repository
public interface IAutomaticAndManualComparisonRepository extends JpaRepository<AutomaticAndManualComparison, String>,
		JpaSpecificationExecutor<AutomaticAndManualComparison> {
	/** 根据测试时间与站点ID、监测项目、时间倒序查询 **/
	List<AutomaticAndManualComparison> findByTimeBetweenAndIndexCodeInAndStationCodeInOrderByTimeDesc(Date startDate,
			Date endDate, List<String> indexCodes, List<String> stationCodes);

	/** 根据测试时间与站点ID、监测项目、时间倒序分页查询 **/
	Page<AutomaticAndManualComparison> findByTimeBetweenAndIndexCodeInAndStationCodeInOrderByTimeDesc(Date startDate,
			Date endDate, List<String> indexCodes, List<String> stationCodes, Pageable pageable);

}
